<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>vcopy_i</title>
    <link rel="stylesheet" type="text/css" href="csound.css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1" />
    <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" />
    <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" />
    <link rel="prev" href="vcopy.html" title="vcopy" />
    <link rel="next" href="vdelay.html" title="vdelay" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">vcopy_i</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="vcopy.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="vdelay.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry">
      <a id="vcopy_i"></a>
      <div class="titlepage"></div>
      <a id="IndexVcopy_i" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">vcopy_i</span>
        </h2>
        <p>vcopy_i — 
      Copies a vector from one table to another.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp162943344"></a>
        <h2>Description</h2>
        <p>
      Copies a vector from one table to another.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp162944560"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>vcopy_i</strong></span>  ifn1, ifn2, ielements [,idstoffset, isrcoffset]</pre>
      </div>
      <div class="refsect1">
        <a id="idp162946640"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>ifn1</em></span>  - number of the table where the vectorial signal will be copied
    </p>
        <p>
      <span class="emphasis"><em>ifn2</em></span>  - number of the table hosting the vectorial signal to be copied
    </p>
        <p>
      <span class="emphasis"><em>ielements</em></span> - number of elements of the vector
    </p>
        <p>
      <span class="emphasis"><em>idstoffset</em></span> - index offset for destination table
    </p>
        <p>
      <span class="emphasis"><em>isrcoffset</em></span> - index offset for source table
    </p>
      </div>
      <div class="refsect1">
        <a id="idp162951696"></a>
        <h2>Performance</h2>
        <p>
      <span class="emphasis"><em>vcopy_i</em></span> copies <span class="emphasis"><em>ielements</em></span> elements from <span class="emphasis"><em>ifn2</em></span> (starting from position <span class="emphasis"><em>isrcoffset</em></span>) to <span class="emphasis"><em>ifn1</em></span> (starting from position <span class="emphasis"><em>idstoffset</em></span>). Useful to keep old vector values, by storing them in another table. This opcode is exactly the same as <a class="link" href="vcopy.html" title="vcopy"><em class="citetitle">vcopy</em></a> but performs all the copying on the intialization pass only.
    </p>
        <p>
      Negative values for <span class="emphasis"><em>idstoffset</em></span> and <span class="emphasis"><em>isrcoffset</em></span> are acceptable. If <span class="emphasis"><em>idstoffset</em></span> is negative, the out of range section of the vector will be discarded. If <span class="emphasis"><em>isrcoffset</em></span> is negative, the out of range elements will be assumed to be 0 (i.e. the destination elements will be set to 0). If elements for the destination vector are beyond the size of the table (including guard point), these elements are discarded (i.e. elements do not wrap around the tables). If elements for the source vector are beyond the table length, these elements are taken as 0 (i.e. the destination vector elements will be 0).
    </p>
        <div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
          <table border="0" summary="Warning">
            <tr>
              <td rowspan="2" align="center" valign="top" width="25">
                <img alt="[Warning]" src="images/warning.png" />
              </td>
              <th align="left">Warning</th>
            </tr>
            <tr>
              <td align="left" valign="top">
                <p>
        Using the same table as source and destination table in versions earlier than 5.04, might produce unexpected behavior, so use with care.
      </p>
              </td>
            </tr>
          </table>
        </div>
        <p>
      All these operators (<a class="link" href="vaddv.html" title="vaddv"><em class="citetitle">vaddv</em></a>,<a class="link" href="vsubv.html" title="vsubv"><em class="citetitle">vsubv</em></a>,<a class="link" href="vmultv.html" title="vmultv"><em class="citetitle">vmultv</em></a>,<a class="link" href="vdivv.html" title="vdivv"><em class="citetitle">vdivv</em></a>,<a class="link" href="vpowv.html" title="vpowv"><em class="citetitle">vpowv</em></a>,<a class="link" href="vexp.html" title="vexp"><em class="citetitle">vexp</em></a>, <a class="link" href="vcopy.html" title="vcopy"><em class="citetitle">vcopy</em></a> and <a class="link" href="vmap.html" title="vmap"><em class="citetitle">vmap</em></a>) are designed to be used together with other opcodes that operate with vectorial signals such as <a class="link" href="vcella.html" title="vcella"><em class="citetitle">vcella</em></a>, <a class="link" href="adsynt.html" title="adsynt"><em class="citetitle">adsynt</em></a>, <a class="link" href="adsynt2.html" title="adsynt2"><em class="citetitle">adsynt2</em></a> etc. 
    </p>
      </div>
      <div class="refsect1">
        <a id="idp162971584"></a>
        <h2>Examples</h2>
        <p>
      See <a class="link" href="vcopy.html" title="vcopy"><em class="citetitle">vcopy</em></a> for an example.
    </p>
      </div>
      <div class="refsect1">
        <a id="idp162973760"></a>
        <h2>Credits</h2>
        <p>Written by Gabriel Maldonado. Optional arguments added by Andres Cabrera and Istvan Varga.</p>
        <p>New in Csound 5 (Previously available only on CsoundAV)</p>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="vcopy.html">Prev</a> </td>
          <td width="20%" align="center">
            <a accesskey="u" href="OpcodesTop.html">Up</a>
          </td>
          <td width="40%" align="right"> <a accesskey="n" href="vdelay.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">vcopy </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> vdelay</td>
        </tr>
      </table>
    </div>
  </body>
</html>
